<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css3新增长度单位</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      /* vw  视口宽度  vh 视口高度 */
      .box {
        width: 100vw;
        height: 100vh;
        background-color: green;
      }
      /* vmax  视口最大值  vmin 视口最小值 */
      .box2 {
        background-color: red;
        width: 20vmax;
        height: 10vmin;
      }
    </style>
  </head>
  <body>
    <div class="box">视口宽度，视口高度</div>
    <div class="box2">vmax和vmin</div>
  </body>
</html>
